#include <iostream>
#include "UsefulFunc.h"

using namespace std;

string cinTakeString(string x)
{
	cout<<x;
	string a="";
	while(!(cin>>a))
	{
		cout<<"This is not a string of characters"<<endl;
		cout<<x;
		cin.clear();
		cin.ignore (1000, '\n');
	}
	return a;
}

int cinTakeInt (string x)
{
	cout<<x;
	int a=NULL;
	while(!(cin>>a))
	{
		cout<<"This is not an integer"<<endl;
		cout<<x;
		cin.clear();
		cin.ignore (1000, '\n');
	}
	return a;
}

char cinTakeCharYorN(string x)
{
	cout<<x;
	char a;
	while((cin>>a))
	{
		if( (a!='y') && (a!='Y') && (a!='n') && (a!='N'))
		{
			cout<<"This is not y or n"<<endl;
			cout<<x;
			cin.clear();
			cin.ignore (1000, '\n');
		} else break;
	}
	return a;
}